package com.goldwind.accompany.service.impl;

import com.goldwind.accompany.dao.AccompanyMapper;
import com.goldwind.accompany.service.Accompany;
import com.goldwind.pojo.AccompanyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AccompanyImpl implements Accompany {
    @Autowired
    private AccompanyMapper accompanyMapper;

    @Override
    public List<AccompanyService> selectAll() {
        return accompanyMapper.selectAll();
    }

    @Override
    public List<AccompanyService> selectByConditions(String gameType, String serviceType, Double minPrice, Double maxPrice, String keyword, Integer status,Integer userId) {
        return accompanyMapper.selectByConditions(gameType, serviceType, minPrice, maxPrice, keyword, status,userId);
    }

    @Override
    public boolean insert(AccompanyService service) {
        accompanyMapper.insert(service);
        return true;
    }

    @Override
    public boolean update(AccompanyService service) {
        accompanyMapper.update(service);
        return true;
    }

    @Override
    public boolean delete(int id) {
        accompanyMapper.delete(id);
        return true;
    }
}
